home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / easydr2.zip / EASYDR2.DOC < prev    next >
Text File  |  1991-11-15  |  36KB  |  1,077 lines

  1.  
  2.  
  3.                                                                       1
  4.  
  5.                                Easy-Door Library
  6.                                    Version 2.0
  7.                                  for QuickBasic
  8.  
  9.                           Released on 01-November-1991
  10.  
  11.                                by Martin Bouchard
  12.                                   1207 du Golf
  13.                                Cap-Rouge, Quebec
  14.                                      Canada
  15.                                     G1Y 2T4
  16.  
  17.  
  18.         Easy-Door is a library that provides a convenient and easy  way
  19.         to program your own doors with Microsoft QuickBASIC.
  20.  
  21.         Doors  programmed with  the  Easy-Door library  are compatibles
  22.         with:
  23.  
  24.              QuickBBS, Remote Access, RBBS, SuperBBS, Telegard, WildCat
  25.              3, Force!,  PcBoard (latest), GAP,  WildCat BBS,  Genesis,
  26.              Spitfire, WWIV, Osiris  and others BBS softwares that uses
  27.              a compatible format with one mentioned above.
  28.  
  29.  
  30.         Features of the Easy-Door library:
  31.         ----------------------------------
  32.  
  33.                   - ANSI/ASCII chat mode that freezes the users time
  34.                     while in chat mode
  35.                   - ANSI color graphic sequence support
  36.                   - Automatic time left verification
  37.                   - Automatic carrier detection
  38.                   - Automatic updated status bar with user's
  39.                     information
  40.                   - Fast modem input/output
  41.                   - Inactivity timeout verification
  42.                   - Keys to force return to BBS or Hang up
  43.                   - Menu with programmable hot keys
  44.                   - Modem and keyboard controls
  45.                   - Routines to change user's time
  46.                   - Sysop DOS shell function
  47.                   - Supports all COM ports
  48.                   - Usefull file sender with pause, stop and more
  49.                   - Uses fossil driver
  50.                   - All text & messages are fully configurable
  51.                   - And more...
  52.  
  53.         Requirements
  54.         ------------
  55.  
  56.                   - IBM Compatibles Computer (XT, 286, 386, 486...)
  57.                   - QuickBasic 4.0 or 4.5
  58.                   - An ANSI driver
  59.                   - Easy-Door library V2.0
  60.  
  61.                      Easy-Door library v2.0 for QuickBasic            2
  62.  
  63.  
  64.  
  65.         Copying and Distribution
  66.         ------------------------
  67.  
  68.         Easy-Door  may  be   copied  and  distributed  freely.  If  you
  69.         distribute Easy-Door  on communication systems such as a BBS or
  70.         CompuServe,  The  Source,  Genie,  etc,  you  must include  the
  71.         following files as a set (using ARC, ARJ, ZIP, LZH, PAK, etc.).
  72.         No fee other  than a disk and handling charge (of up to 8$) may
  73.         be  charged.  The  Easy-Door  library  is  copyrighted  and  no
  74.         modification may be made to the library.
  75.  
  76.  
  77.         Description of files
  78.         ---------------------
  79.  
  80.                   - EASYDR2.DOC  (Easy-Door documentation)
  81.                   - EASYDR2.LIB  (Easy-Door module for compiling)
  82.                   - EDRQLB.BAT   (Batch file to create EASYDR2.QLB)
  83.                   - REGISTER.DOC (Registration form)
  84.                   - EASYDEMO.ZIP (Demo for getting started)
  85.                   - T_HANOI.ZIP  (A game using Easy-Door)
  86.                   - EASYDOOR.BI  (Easy-Door SUB/FUNCTION declaration)
  87.                   - EASYANSI.BI  (Include file for ANSI color code)
  88.                   - EASYPARA.BI  (Include file for configurable
  89.                                  parameters)
  90.                   - AUTOBBS.BI   (Module for semi-automatic BBS
  91.                                  detection)
  92.                   - REGUSER.TXT  (A note to registered users)
  93.                   - PDQ.TXT      (A note to PDQ users)
  94.  
  95.                      Easy-Door library v2.0 for QuickBasic            3
  96.  
  97.  
  98.  
  99.         Disclaimer
  100.         ----------
  101.  
  102.         These routines have not caused  me any problems, and seem to be
  103.         fully  debuged.  However,  I will  not  be responsible  for any
  104.         damages caused by use, misuse or inability to use Easy-Door. 
  105.  
  106.  
  107.         Description of a door
  108.         ---------------------
  109.  
  110.         A door is an external program that works in  conjunction with a
  111.         Bulletin  Board System  (BBS). Doors  are difficult  to program
  112.         because they  have to use the modem input/output commands, ANSI
  113.         display, carrier detection, inactivity time out, time left, hot
  114.         keys, status bar, etc. This is  where Easy-Door can be used. It
  115.         makes  the  usually  tedious  task  of  programming doors  much
  116.         easier, and hence cuts the time of program development.
  117.  
  118.  
  119.         Fossil driver
  120.         -------------
  121.  
  122.         A fossil  driver is a resident  program that controls different
  123.         things. X00 is such a  driver (X00 is copyright by Ray  Gwinn).
  124.         The advantage  of a fossil  driver is simple: you  can count on
  125.         reliable   communication   routines,    it   supports   various
  126.         configuration like  COM3 and COM4  and it's  very fast. There's
  127.         also other  Revison 5  fossil driver  likes  BNU. A  non-fossil
  128.         driver based version of Easy-Door is in developpement for those
  129.         who would prefers standard communication routines.
  130.  
  131.                      Easy-Door library v2.0 for QuickBasic            4
  132.  
  133.  
  134.  
  135.         Registration
  136.         ------------
  137.  
  138.         The  Easy-Door library  is NOT  public domain,  it's SHAREWARE.
  139.         This means that you have to pay a registration fee of $25 US if
  140.         you decide to  use the Easy-Door library in your  programs. The
  141.         registration cost is minimal and will allow the author to write
  142.         new and improved versions of the Easy-Door library. Please note
  143.         that  the unregistered  version is  the same as  the registered
  144.         version except  that a special credit  screen is displayed each
  145.         time an  Easy-Door program  is executed.  Registered users will
  146.         receive a disk containing the  latest version of the  Easy-Door
  147.         library with a unique encrypted serial number.
  148.  
  149.  
  150.         How to use Easy-Door library routines?
  151.         --------------------------------------
  152.  
  153.         You  must  create  the  EasyDr2.QLB  quick-library  for the  QB
  154.         environment. To do this, execute the batch file EDRQLB.BAT.
  155.  
  156.         Example:  EDRQLB EasyDr2   (This will create a .QLB for QB 4.5)
  157.  
  158.         For others version of QuickBasic, edit  the file EDRQLB.BAT and
  159.         change  the  indicated  number  (45)  to  your current  version
  160.         number.
  161.  
  162.         To use the  Easy-Door library, you must  first load Quick-Basic
  163.         with the (QB  /l EasyDR2) statement. Each routine is  used like
  164.         it was built in QuickBasic:
  165.  
  166.             K$ = GetChar$
  167.             SendCR Red$ + "This red line is going to modem and screen"
  168.  
  169.         Every Easy-Door variable is a string or integer. So, when using
  170.         numeric  variables, put the  % sign after the  variable name or
  171.         put a DEFINT A-Z at the beginning of your program.
  172.  
  173.                      Easy-Door library v2.0 for QuickBasic            5
  174.  
  175.  
  176.  
  177.         Technical information about Easy-Door
  178.         -------------------------------------
  179.  
  180.         Easy-Door  provides an  easy alternative  for writing  your own
  181.         doors.  For  example,  you don't  have  to pay  attention about
  182.         opening  the communication  port. Easy-Door  will automatically
  183.         determine which serial port is in use by the BBS.
  184.  
  185.         To access  the  communication  port, Easy-Door  uses  assembler
  186.         fossil  driver  routines.  Consequently,  you  can  access  the
  187.         communication  port  at  a  high  speed  rate.  To obtain  ANSI
  188.         color/graphics,  you  must  install  in  your   CONFIG.SYS  the
  189.         ANSI.SYS  provided  with DOS  or  a  compatible  driver (ZANSI,
  190.         NNANSI, etc.), if it's not already installed.
  191.  
  192.         Each time an Easy-Door  command is called, Easy-Door  checks if
  193.         the  user has  disconnected. Also,  Easy-Door checks  the daily
  194.         time limit of  the user and, after  2 minutes of  inactivity or
  195.         any other  value in the  configuration, Easy-Door  will hang up
  196.         the line and will return to the BBS.
  197.  
  198.         A very useful option  of Easy-Door  is hot keys.  Hot keys  are
  199.         keys that the user can press during the transmission  of a menu
  200.         so  that a  user  will not  have to  wait  for the  end  of the
  201.         transmission to press a key. Hot keys are difficult to program,
  202.         but with the Easy-Door library it's a pleasure to use.
  203.  
  204.         User  information is  read  in  a file  that each  BBS  program
  205.         produces every  time a door is run. This  file is different for
  206.         each type of BBS. Easy-Door supports a lots of them. But if you
  207.         don't run the door  from a BBS, Easy-Door will put the  door in
  208.         LOCAL mode.
  209.  
  210.  
  211.         Description of .BI file
  212.         -----------------------
  213.  
  214.         Files that  have the .BI extension  (Basic Include) are modules
  215.         that you must  include in your  Easy-Door programs.  Read those
  216.         files for more information on each  one. To include a .BI  file
  217.         in your program type (for example):
  218.  
  219.              ' $INCLUDE: 'EasyAnsi.BI'
  220.  
  221.                      Easy-Door library v2.0 for QuickBasic            6
  222.  
  223.  
  224.  
  225.         Example of a door program structure
  226.         -----------------------------------
  227.  
  228.              ' DEFINT A-Z   All variables are now integer by default
  229.  
  230.              ' Your own program DECLARE...
  231.  
  232.              ' INCLUDE$: 'EasyDoor.BI'     SUB/FUNCTION Declaration
  233.              ' INCLUDE$: 'AutoBBS.BI'      Semi-automatic    BBS   type
  234.                                            detector.
  235.              ' INCLUDE$: 'EasyANSI.BI'     ANSI module
  236.              ' INCLUDE$: 'EasyPara.BI'     Parameters
  237.  
  238.  
  239.              ' The INIT routine...         Ex. Init Para$(), NPara()
  240.  
  241.              ' Your program code...
  242.  
  243.              ' The ReturnBBS routine...
  244.  
  245.         Please see the EasyDemo.BAS file for a practical example of the
  246.         structure of an Easy-Door program.
  247.  
  248.                      Easy-Door library v2.0 for QuickBasic            7
  249.  
  250.  
  251.  
  252.         String configurable parameters
  253.         ------------------------------
  254.  
  255.              Parameter      Description
  256.              ---------      -----------
  257.  
  258.              Para$(1) =     Chat mode entered
  259.              Para$(2) =     ESC to end chat mode
  260.              Para$(3) =     Hello this is the Sysop.
  261.              Para$(4) =     Sysop chat text color
  262.              Para$(5) =     User chat text color
  263.              Para$(6) =     Sysop chat mode ended
  264.              Para$(7) =     Warning  - User  inactivity timeout  in  30
  265.                             seconds
  266.              Para$(8) =     User inactivity timeout, Hanging Up...
  267.              Para$(9) =     ERROR: (Displayed when there's an error)
  268.              Para$(10) =    Press S to stop or P to pause
  269.              Para$(11) =    Press P to pause
  270.              Para$(12) =    P (Pause key)
  271.              Para$(13) =    S (Stop key)
  272.              Para$(14) =    Hanging Up...
  273.              Para$(15) =    No Carrier, Communication Lost
  274.              Para$(16) =    Data file not found."
  275.              Para$(17) =    Returning to BBS...
  276.              Para$(18) =    Exceeded
  277.              Para$(19) =    Time Limit Exceeded. Call Back Tomorrow
  278.              Para$(20) =    More Y/N?
  279.              Para$(21) =    Y (Yes key for more)
  280.              Para$(22) =    N (No key for more)
  281.              Para$(23) =    Displayed after a MORE Y/N ? (See file)
  282.              Para$(24) =    Needs a revision 5 fossil driver to operate
  283.              Para$(25) =    Paused (When PauseClock is activated)
  284.              Para$(26) =    The Sysop has shelled to DOS...
  285.              Para$(27) =    DOS Shell: Type <EXIT> to Return to DOOR
  286.              Para$(28) =    The Sysop has returned from DOS
  287.              Para$(29) =    Warning:  Less than  2 min.  remaining this
  288.                             call
  289.              Para$(30) =    FullName$      |
  290.              Para$(31) =    Location$      |
  291.              Para$(32) =    Baud$          | Information that were
  292.              Para$(33) =    Com$           | read in DOORDEF.BI module
  293.              Para$(34) =    AnsiFlag$      |
  294.              Para$(35) =    TimeRemaining$ |
  295.              Para$(36) =    Local Mode (Message when in local mode)
  296.              Para$(37) =    min. (on status bar)
  297.  
  298.                      Easy-Door library v2.0 for QuickBasic            8
  299.  
  300.  
  301.  
  302.         Numeric configurable parameters
  303.         -------------------------------
  304.  
  305.              Parameter      Description
  306.              ---------      -----------
  307.  
  308.              NPara(1) =     55   (Delay to lower DTR when hanging up in
  309.                                  18th/sec)
  310.              NPara(2) =     15   (Pause delay when 'P' hit sec.)
  311.              NPara(3) =     120  (User Inactivity Timeout in sec.)
  312.              NPara(4) =     18   (Delay after a no carrier in 18th/sec)
  313.              NPara(5) =     18   (Delay when DATA FILE NOT FOUND in
  314.                                  18th/sec)
  315.              NPara(6) =     24   (Nb of line in user's window)
  316.              NPara(7) =     1    (Carrier Detect On/Off)
  317.              NPara(8) =     FG + 16 * BG   Status Bar Color (combined
  318.                                            color number)
  319.              NPara(9) =     1    (Enable time counter)
  320.              NPara(10) =    0    (Used internally by time counter)
  321.              NPara(11) =    6    (Row where to put cursor when shelling
  322.                                  to DOS)
  323.              NPara(12) =    1    (Enable ALT-X or ALT-R to force exit)
  324.              NPara(13) =    120  (Enable warning before daily timeout,
  325.                                  0= off, or number of sec. for ON)
  326.              NPara(14) =    1    (Enable keys to change time)
  327.              NPara(15) =    0    (Used internally by inactivity
  328.                                  checker)
  329.              NPara(16) =    0    (Disable chat mode (0=Turn off, 1=Turn
  330.                                  on)
  331.              NPara(17) =    1    (Enable Status Bar)
  332.              NPara(18) =    42   (Column where BAUD/LOCALLY is displayed
  333.                                  on status bar)
  334.  
  335.                      Easy-Door library v2.0 for QuickBasic            9
  336.  
  337.  
  338.  
  339.         EasyAnsi.BI Module
  340.         ------------------
  341.  
  342.         This include file contains all the necessary code to uses  ANSI
  343.         escape sequence in your own door.
  344.  
  345.  
  346.              AnsiReset$:    Resets all ANSI attributes
  347.              Blink$:        Turns blinking on
  348.              Invert$:       Turns on reverse color
  349.              Bright$:       Turns on brighting
  350.              SavePos$:      Saves current cursor position
  351.              RestorePos$:   Restores the previously saved cursor
  352.                             position
  353.  
  354.              Foreground colors:  Black$, Red$,  Green$, Yellow$, Blue$,
  355.                                  Magenta$, Cyan$, White$
  356.  
  357.              Background colors:  BlackBack$,    RedBack$,   GreenBack$,
  358.                                  YellowBack$,  BlueBack$, MagentaBack$,
  359.                                  CyanBack$, WhiteBack$
  360.  
  361.  
  362.         AutoBBS.BI Module
  363.         -----------------
  364.  
  365.         AutoBBS.BI  is a module that reads the command line, interprets
  366.         it and calls the door definition reader module corresponding to
  367.         the BBS program  used. The command line must contains  the name
  368.         of the door definition file used. For example, DORINFO1.DEF, if
  369.         passed  on the  command  line, will  activate  the QBBS/RA/RBBS
  370.         module automatically.  But if  the command  line is empty,  the
  371.         door will executed in LOCAL mode. 
  372.  
  373.  
  374.         Special keys that can be used with Easy-Door
  375.         --------------------------------------------
  376.  
  377.              Alt H          =    Hangs Up
  378.              Alt R or X     =    Returns to the BBS without hanging up
  379.              Alt C          =    Enters Chat Mode
  380.              Alt J          =    Jumps to DOS (Dos Shell)
  381.              Alt =          =    Adds one minute to time remaining
  382.              Alt -          =    Substracts one minute to time
  383.                                  remaining
  384.  
  385.                      Easy-Door library v2.0 for QuickBasic           10
  386.  
  387.  
  388.  
  389.         AddSlash$ (FilePath$)
  390.         ---------------------
  391.  
  392.              Type: Function
  393.  
  394.              Adds  a  backslash to  the  filename  if  there's  not one
  395.              already. Very usefull for processing configuration file.
  396.  
  397.              Example:  C:\QBBS        --->      C:\QBBS\
  398.                        C:\QBASIC\     --->      C:\QBASIC\
  399.  
  400.  
  401.         AnsiLocate Y%, X%
  402.         -----------------
  403.  
  404.              Type: Subroutine
  405.  
  406.              This routine is  similar to the LOCATE statement.  It puts
  407.              the cursor  at specified  rows and  colums by  using ANSI.
  408.              Note that  the two  parameters use  Microsoft's convention
  409.              for cursor position (Y before X). AnsiLocate  must be used
  410.              only if user has ANSI. 
  411.  
  412.  
  413.         AnsiPrint Text$
  414.         ---------------
  415.  
  416.              Type: Subroutine
  417.  
  418.              Prints a string  on screen only and supports ANSI  code if
  419.              an  ANSI  driver  is  present. It  prints  at the  current
  420.              position  and scrolls  the  screen, if  necessary,  to not
  421.              overwrite the status bar.
  422.  
  423.              Example:  AnsiPrint Green$  + "This line is  not sent over
  424.                        the modem."
  425.  
  426.                      Easy-Door library v2.0 for QuickBasic           11
  427.  
  428.  
  429.  
  430.         BackSpace Number%
  431.         -----------------
  432.  
  433.              Type: Subroutine
  434.  
  435.              Sends a specified number of destructive backspace to modem
  436.              and screen.
  437.  
  438.              Example:  BackSpace(6) ' Sends 6 backspace
  439.  
  440.  
  441.         Bell State%
  442.         -----------
  443.  
  444.              Type: Subroutine
  445.  
  446.              Turns  the SendBell routine on or  off (ON=1, OFF=0). When
  447.              bell is turned off, no bell signal is sent.
  448.  
  449.              Example: Bell 1  ' Turns on bell signal
  450.  
  451.  
  452.         Carrier State%
  453.         --------------
  454.  
  455.              Type: Subroutine
  456.  
  457.              Turns carrier detection on or off. (ON=1, OFF=0) 
  458.  
  459.              Example: Carrier 0 ' Carrier detection OFF
  460.  
  461.  
  462.         Cap$ (Text$)
  463.         -----------
  464.  
  465.              Type: Function
  466.  
  467.              Capitalizes a  string. Gives  a more  professional look to
  468.              doors.
  469.  
  470.              Example:  User$= "JOHN-OLIVER SMITH"
  471.                        User$= Cap$(User$)
  472.                        ' Results: John-Oliver Smith
  473.  
  474.                      Easy-Door library v2.0 for QuickBasic           12
  475.  
  476.  
  477.  
  478.         Center$ (Text$)
  479.         --------------
  480.  
  481.              Type: Function
  482.  
  483.              Centers a string on a 80 column monitor.
  484.  
  485.              Example:  SendCR Center$("Returning to BBS.")
  486.  
  487.  
  488.         ChangeDTR State%
  489.         ----------------
  490.  
  491.              Type: Subroutine
  492.  
  493.              Changes  the  Data  Terminal  Ready  (DTR)  status on  the
  494.              current serial port. A value of 1 will  raise the DTR, and
  495.              a 0  will lower it. On most modems,  lowering the DTR will
  496.              force the modem to hang up.
  497.  
  498.              Example:  ChangeDTR 0 ' Puts the DTR low
  499.                        ChangeDTR 1 ' Puts the DTR high
  500.  
  501.  
  502.         ChangeNPara Num%, Value%
  503.         ------------------------
  504.  
  505.              Type: Subroutine
  506.  
  507.              Changes  a numeric configuration parameters to a specified
  508.              value when the door is running.
  509.  
  510.              Example:  ChangeNPara 3, 60 ' Inactivity timeout = 60 sec.
  511.  
  512.  
  513.         ChangePara Num%, Message$
  514.         -------------------------
  515.  
  516.              Type: Subroutine
  517.  
  518.              Changes a  string configuration parameters  to a specified
  519.              parameter when the door is running.
  520.  
  521.              Example:  ChangePara 25, "Stopped" ' Pause clock message
  522.  
  523.                      Easy-Door library v2.0 for QuickBasic           13
  524.  
  525.  
  526.  
  527.         ChangeTime NewTime%
  528.         -------------------
  529.  
  530.              Type: Subroutine
  531.  
  532.              Changes the time that the user has left (in minutes).
  533.  
  534.              Example:  ChangeTime 60 ' User has now 60 min. left
  535.  
  536.  
  537.         ChatMode
  538.         --------
  539.  
  540.              Type: Subroutine
  541.  
  542.              Forces the activation of the chat mode.
  543.  
  544.              Example:  ChatMode ' Chat mode is now activated
  545.  
  546.         CheapSend Text$
  547.         ---------------
  548.  
  549.              Type: Subroutine
  550.  
  551.              Sends  a string  without  checking the  carrier,  the time
  552.              limit, or other  special things.  Used internally by Easy-
  553.              Door.
  554.  
  555.  
  556.         CheckCD
  557.         -------
  558.  
  559.              Type: Subroutine
  560.  
  561.              Forces Easy-Door to check if there is a lost of carrier on
  562.              the  current  serial port.  If  there is  no carrier,  the
  563.              program  will be  terminated and  will  return to  DOS (or
  564.              return control  to the  BBS  if  installed on  one).  This
  565.              routine is not  usually used because Easy-Door performs an
  566.              automatic carrier  detection  each  time  input/output  is
  567.              made. But it  can be used if no modem "i/o"  is made for a
  568.              long period of time.
  569.  
  570.              Example:  CheckCD ' Forces Easy-Door to check for carrier
  571.  
  572.                      Easy-Door library v2.0 for QuickBasic           14
  573.  
  574.  
  575.  
  576.         CheckIB State%
  577.         --------------
  578.  
  579.              Type: Subroutine
  580.  
  581.              Checks the  input buffer. State% will  be a non-zero value
  582.              if there's characters in the input buffer.
  583.  
  584.  
  585.         CheckInac
  586.         ---------
  587.  
  588.              Type: Subroutine
  589.  
  590.              Loops until  there's a character  in the  buffer and check
  591.              for inactivity timeout. Used internally
  592.  
  593.  
  594.         CheckOB State%
  595.         --------------
  596.  
  597.              Type: Subroutine
  598.  
  599.              Checks if the modem output buffer is full. State% will  be
  600.         a
  601.              non-zero value if full.
  602.  
  603.              Example:  CheckOB State% ' 0= Empty, others= Full
  604.  
  605.  
  606.         ColorizeBAR
  607.         -----------
  608.  
  609.              Type: Subroutine
  610.  
  611.              Erases and colorize the status bar. Used internally.
  612.  
  613.                      Easy-Door library v2.0 for QuickBasic           15
  614.  
  615.  
  616.  
  617.         Deinit
  618.         ------
  619.  
  620.              Type: Subroutine
  621.  
  622.              Deinitializes  the  FOSSIL   driver.  Used  internally  by
  623.              Easy-Door. ReturnBBS automatically calls this  routine, so
  624.              you have no reason to call it.
  625.  
  626.  
  627.         EndError (ErrorMessage$)
  628.         ------------------------
  629.  
  630.              Type: Subroutine
  631.  
  632.              Terminate a door by printing a specified ERROR message.
  633.  
  634.              Example:  EndError "No configuration file was found"
  635.  
  636.  
  637.         GetChar$
  638.         -------
  639.  
  640.              Type: Function
  641.  
  642.              Returns  either   a  one-character  string  containing   a
  643.              character read from  the modem/keyboard buffer or an empty
  644.              string ("")  if no character  is pending.  This routine is
  645.              similar  to the  QuickBasic INKEY$  statement but  reads a
  646.              character from modem and keyboard.
  647.  
  648.              Example:  K$ = GetChar$
  649.  
  650.  
  651.         HangUp
  652.         ------
  653.  
  654.              Type: Subroutine
  655.  
  656.              Disconnects the user by hanging up the modem.
  657.  
  658.              Example:  HangUp ' Disconnects the user online
  659.  
  660.                      Easy-Door library v2.0 for QuickBasic           16
  661.  
  662.  
  663.  
  664.         HotKeys State%
  665.         --------------
  666.  
  667.              Type: Subroutine
  668.  
  669.              Turns hot keys on or off. (ON=1, OFF=0)
  670.  
  671.              Example:  HotKeys 0 ' Turns off hot keys
  672.  
  673.  
  674.         Init Para$(), NPara%()
  675.         ----------------------
  676.  
  677.              Type: Subroutine
  678.  
  679.              Initializes Easy-Door.  Para$() and  NPara%() are the  two
  680.              arrays that  contains your  own preferences  (see the file
  681.              EasyPara.BI). This  routine is the most  important of all.
  682.              It performs initialization to the modem, sets up different
  683.              parameters and more.  You must call Init  before any other
  684.              routine. If you omit this, your program will not work.
  685.  
  686.              Example:  Init Para$(), NPara%()   ' Initialize Easy-Door
  687.  
  688.  
  689.         KeyExit State%
  690.         --------------
  691.  
  692.              Type: Subroutine
  693.  
  694.              Turns ALT-R or ALT-X on or off (ON=1, OFF=0).
  695.  
  696.              Example:  KeyExit 0 ' ALT-R/X is now off
  697.  
  698.  
  699.         LineFeed NumberOfLF%
  700.         --------------------
  701.  
  702.              Type: Subroutine
  703.  
  704.              Sends a specified number of linefeed to screen and modem.
  705.  
  706.                      Easy-Door library v2.0 for QuickBasic           17
  707.  
  708.  
  709.  
  710.         ModemInput (Message$, Box$, Answer$, MaxLen%)
  711.         ---------------------------------------------
  712.  
  713.              Type: Subroutine
  714.  
  715.              Inputs a string  from the modem or the keyboard.  You have
  716.              to specify the maximum length of the string. If MaxLen% is
  717.              a  negative number, the  answer will be in  upper case. If
  718.              you  don't want  a prompt,  use an  empty string  ("") for
  719.              Message$.
  720.  
  721.              Example:  ModemInput   (Green$  +   "Type  your   age:  ",
  722.                        BlueBack$ + White$, Age$, 2)
  723.  
  724.                        This  line will  ask  the  user for  his  age in
  725.                        green.  The answer  will be  in white  on  a two
  726.                        characters blue box.
  727.  
  728.  
  729.         ModemInputChar$
  730.         --------------
  731.  
  732.              Type: Function
  733.  
  734.              Inputs a character from  the modem or  the keyboard.  This
  735.              routine will wait for one character and returns control to
  736.              the program thereafter.
  737.  
  738.              Example:  K$ = ModemInputChar$
  739.                        SendCR "You just pressed: " + k$
  740.  
  741.  
  742.         ModemOnlySend Text$
  743.         -------------------
  744.  
  745.              Type: Subroutine
  746.  
  747.  
  748.              Sends a string of characters only to the modem, not to the
  749.              screen. No linefeed is added.
  750.  
  751.                      Easy-Door library v2.0 for QuickBasic           18
  752.  
  753.  
  754.  
  755.         NoCarrier
  756.         ---------
  757.  
  758.              Type: Subroutine
  759.  
  760.              Called internally by Easy-Door when there's no carrier.
  761.  
  762.  
  763.         NotFound
  764.         --------
  765.  
  766.              Type: Subroutine
  767.  
  768.              Displays  a message warning  the user that a  file was not
  769.              found.
  770.  
  771.  
  772.         Num2Str$ (IntValue%)
  773.         -------------------
  774.  
  775.              Type: Function
  776.  
  777.              Converts an  integer number  to a  string like BASIC  STR$
  778.              function but does not add the spaces at the beginning  and
  779.              ending  of the  string.  Usefull for  sending  number with
  780.              SendCR.
  781.  
  782.              Example:  Number$ = Num2Str$ (1992)
  783.                        ' Number$ will be "1992"
  784.  
  785.  
  786.         PauseClock
  787.         ----------
  788.  
  789.              Type: Subroutine
  790.  
  791.              Pauses the time left  clock. Please note that the ordinary
  792.              time clock is not altered in any way.
  793.  
  794.                      Easy-Door library v2.0 for QuickBasic           19
  795.  
  796.  
  797.  
  798.         PurgeInBuffer
  799.         -------------
  800.  
  801.              Type: Subroutine
  802.  
  803.              Clears all the pending characters in the modem and in  the
  804.              keyboard input buffer.
  805.  
  806.              Example:  PurgeInBuffer
  807.  
  808.  
  809.         PurgeOutBuffer
  810.         --------------
  811.  
  812.              Type: Subroutine
  813.  
  814.              Clears all the characters in the output buffer not already
  815.              transmitted.
  816.  
  817.              Example:  PurgeOutBuffer
  818.  
  819.  
  820.         ResumeClock
  821.         -----------
  822.  
  823.              Type: Subroutine
  824.  
  825.              Restarts  the time  left  clock paused  by  the PauseClock
  826.              routine.
  827.  
  828.  
  829.         ReturnBBS
  830.         ---------
  831.  
  832.              Type: Subroutine
  833.  
  834.              You must use this routine to return to the BBS. DO NOT USE
  835.              the normal  END  statement  otherwise  the  computer  will
  836.              crash. This  routine will also  display a  message on  the
  837.              status bar to announce the return to the BBS.
  838.  
  839.              Example: ReturnBBS ' Exits the DOOR and returns to the BBS
  840.  
  841.                      Easy-Door library v2.0 for QuickBasic           20
  842.  
  843.  
  844.  
  845.         Send Text$
  846.         ----------
  847.  
  848.              Type: Subroutine
  849.  
  850.              Sends a  string of  characters  to the  modem and  to  the
  851.              screen. No linefeed is added.
  852.  
  853.              Example: Send "Welcome to this door!"
  854.  
  855.  
  856.         SendBell
  857.         --------
  858.  
  859.              Type: Subroutine
  860.  
  861.              Sends a BELL signal if the bell is turned on. The BELL is
  862.              hear only on the remote computer, not by the Sysop.
  863.  
  864.  
  865.              Example:  SendBell ' Send a bell signal (ASCII 7)
  866.  
  867.  
  868.         SendCLS
  869.         -------
  870.  
  871.              Type: Subroutine
  872.  
  873.              Clears the screen on both side (local and remote).
  874.  
  875.              Example:  SendCLS ' The screen is now empty
  876.  
  877.  
  878.         SendCR Text$
  879.         ------------
  880.  
  881.              Type: Subroutine
  882.  
  883.              Sends a  string of  characters  to the  modem and  to  the
  884.              screen. A linefeed is automatically added. 
  885.  
  886.              Example:  SendCR "One moment please..."
  887.  
  888.                      Easy-Door library v2.0 for QuickBasic           21
  889.  
  890.  
  891.  
  892.         SendFile FileName$, TypeNumber%
  893.         -------------------------------
  894.  
  895.              Type: Subroutine
  896.  
  897.              Displays a file.  If the file exceeds the screen,  it will
  898.              be scrolled. For  a pause after each page use  the SendTXT
  899.              routine instead.
  900.  
  901.              TypeNumber%         Function available
  902.  
  903.                   0              Pause and Stop
  904.                   1              Pause only
  905.  
  906.              Example:  SendFile  "EasyDoor.DOC",  0   '  Pause  &  Stop
  907.                        enabled
  908.  
  909.  
  910.         SendMenu FileName$, KeyList$, Key$, TypeNumber%
  911.         -----------------------------------------------
  912.  
  913.              Type: Subroutine
  914.  
  915.              Sends a  menu file. During the  transmission, the user may
  916.              press a  key in  the  KeyList$. The  menu name  must be  a
  917.              filename  with no  extension. Easy-Door  will add  .ASC or
  918.              .ANS to the file  name depending if the user  has ASCII or
  919.              ANSI graphics.
  920.  
  921.              TypeNumber%              Description
  922.  
  923.                   0         Waits for  a key if none  is pressed during
  924.                             transmission of the menu. A normal menu.
  925.  
  926.                   1         Do  not wait for a key  if none are pressed
  927.                             during transmisson  of the  menu. Not often
  928.                             used 
  929.  
  930.              Example:  SendMenu  "MainMenu", "DUQ",  K$, 0  ' Transmits
  931.                        the Menu.ASC or  Menu.ANS file and waits for D,U
  932.                        or Q
  933.  
  934.                      Easy-Door library v2.0 for QuickBasic           22
  935.  
  936.  
  937.  
  938.         SendMenuString Text$, KeyList$, Key$, TypeNumber%
  939.         -------------------------------------------------
  940.  
  941.              Type: Subroutine
  942.  
  943.              Sends a  string of  characters  and checks  if a  key  was
  944.              pressed  during  the transmission.  If  there  was  no key
  945.              pressed when the string was sent, Easy-Door will  wait for
  946.              one in the KeyList$ (except if TypeNumber% = 2)
  947.  
  948.              TypeNumber%              Description
  949.  
  950.                   0         Asks a key if no key was pressed during    
  951.                             transmission of the string.
  952.  
  953.                   1         Do not wait for a key when none are pressed
  954.                             during transmisson of the string.
  955.  
  956.                   2         Do not uses the KeyList$, but  enables stop
  957.                             and  pause  (S/P). Usefull  for  users  who
  958.                             don't  like  to  read  everything. Advanced
  959.                             user may use it.
  960.  
  961.              Example:  S$ = "[R]eturn to main menu, [Q]uit this DOOR"
  962.                        SendString S$, "RQ", K$, 0
  963.                        SendCR "The user has pressed: "+ K$
  964.  
  965.  
  966.         SendTXT FileName$, TypeNumber%
  967.         ------------------------------
  968.  
  969.              Type: Subroutine
  970.  
  971.              Sends a normal text file and prompts for more  at each end
  972.              of screen.
  973.  
  974.              TypeNumber%         Function available
  975.  
  976.                   0              Pause and Stop
  977.                   1              Pause only
  978.  
  979.              Example:  SendTXT "EasyDoor.DOC", 0
  980.  
  981.                      Easy-Door library v2.0 for QuickBasic           23
  982.  
  983.  
  984.  
  985.         SpecialCLS
  986.         ----------
  987.  
  988.              Type: Subroutine
  989.  
  990.              Clears  the screen  locally and  redraw the  bottom status
  991.              bar.
  992.  
  993.  
  994.         StatusPrint Text$
  995.         -----------------
  996.  
  997.              Type: Subroutine
  998.  
  999.              Prints a strings on the status bar. The string is  automa-
  1000.              tically centered.
  1001.  
  1002.  
  1003.         TimeKeys (State%)
  1004.         -----------------
  1005.  
  1006.              Type: Subroutine
  1007.  
  1008.              Turns the  keys to change  time on or  off (ON=1,  OFF=0).
  1009.              Those keys are (ALT -) and (ALT =).
  1010.  
  1011.  
  1012.         TimeLeft%
  1013.         --------
  1014.  
  1015.              Type: Function
  1016.  
  1017.              Returns the number of minutes left the user has.
  1018.  
  1019.              Example:  SendCR "You  have  " +  Num2Str$(TimeLeft%) +  "
  1020.                        min. remaining."
  1021.  
  1022.                      Easy-Door library v2.0 for QuickBasic           24
  1023.  
  1024.  
  1025.  
  1026.         TimeOut (Minute%)
  1027.         -----------------
  1028.  
  1029.              Type: Subroutine
  1030.  
  1031.              Changes the inactivity timeout delay (in minute). 
  1032.  
  1033.              Example:  TimeOut  4 '  Sets the  inactivity timeout  to 4
  1034.                        minutes
  1035.  
  1036.         WaitOB
  1037.         ------
  1038.  
  1039.              Type: Subroutine
  1040.  
  1041.              Loops until the modem output buffer become empty.
  1042.  
  1043.                      Easy-Door library v2.0 for QuickBasic           25
  1044.  
  1045.  
  1046.  
  1047.  
  1048.         Note from the author:
  1049.  
  1050.              Thank you  for using the Easy-Door  library. Hopefully, it
  1051.              will be as useful to you as  it is to me. Since  Easy-Door
  1052.              is so easy and  powerfull, you might find yourself writing
  1053.              your  own door  and putting  it on  the  shareware market.
  1054.              Regis-tration is, therefore, a  good idea. Please register
  1055.              today!
  1056.  
  1057.  
  1058.         Special thanks:
  1059.  
  1060.              Andre Morin, Nicolas Saillant, Ken Bienvenue, Mike  Welch,
  1061.              Wig DeMoville, Eric  Yung, Gary  Peterson, all  registered
  1062.              users and everybody who helped me in this project.
  1063.  
  1064.  
  1065.         How to reach the author?
  1066.  
  1067.              - by NetMail at Bab-O-Manie 1:240/507
  1068.              - by International QuickBasic Echo
  1069.              - by regular mail (see address at the beginning of
  1070.                documentation)
  1071.  
  1072.  
  1073.  
  1074.  
  1075.                                     * END *
  1076.  
  1077.